//package com.mall.search.remote.factory;
//
//import com.mall.common.core.domain.Result;
//import com.mall.search.common.domain.SkuEsModel;
//import com.mall.search.remote.EsSaveRemoteServer;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.cloud.openfeign.FallbackFactory;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//import java.util.List;
//
//@Component
//public class RemoteEsSaveFallbackFactory implements FallbackFactory<EsSaveRemoteServer> {
//    private static final Logger log = LoggerFactory.getLogger(RemoteEsSaveFallbackFactory.class);
//
//    @Override
//    public EsSaveRemoteServer create(Throwable throwable)
//    {
//        log.error("调用失败:{}", throwable.getMessage());
//        return new EsSaveRemoteServer()
//        {
//            @Override
//            public Result saveSkuByPublish(List<SkuEsModel> list) throws IOException {
//                return Result.error("调用失败");
//            }
//        };
//    }
//}
